// cookie的封装
var operator = "=";
function getCookieValue(keyStr){
	var value=null;
	var allInfo=window.document.cookie;
	// console.log(name);
	var arr=allInfo.split("; ");//username=zsh; userimg=img/default.png
	for(var i=0;i<arr.length;i++){
		var str=arr[i];//username=zsh
		// console.log(str)
		var k=str.split(operator)[0];//username
		var v=str.split(operator)[1];//zsh
		if(k==keyStr){
			value=v;
			break;
		}
	}
	return value;
}
function setCookieValue(key,value){
	document.cookie=key+operator+value;
}